package com.ll.aync;

import lombok.Data;
import org.springframework.context.ApplicationEvent;

import java.util.concurrent.CountDownLatch;

public class CustomEvent extends ApplicationEvent {

	private static final long serialVersionUID = 1L;
	private static ThreadLocal<String> threadLocal = new ThreadLocal<>();
	public CountDownLatch count ;

	public CustomEvent(Object source) {
		super(source);
	}

	public static void buildLocal(String str){
		threadLocal.set(str);
	}

	public static String getLocal() {
		return threadLocal.get();
	}

//	public void endFinish(){
//		count.countDown();
//	}

}
